import request from '/@/utils/request';

export function useRoleApi() {
    return {
        roleList: (data: object) => {
            return request({
                url: '/api/system/role/list',
                method: 'post',
                data,
            });
        },

        allRoleList: () => {
            return request({
                url: '/api/system/role/allList',
                method: 'post',
            });
        },

        roleDetail: (data: object) => {
            return request({
                url: '/api/system/role/detail',
                method: 'post',
                data,
            });
        },

        editRole: (data: object) => {
            return request({
                url: '/api/system/role/edit',
                method: 'post',
                data,
            });
        },

        deleteRole: (data: object) => {
            return request({
                url: '/api/system/role/delete',
                method: 'post',
                data,
            });
        },

    };
}